<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html >
<html style="height: 100%; width: 100%;">

<head>
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量 
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。 
	pageContext.setAttribute("basePath", basePath);
%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet"
	href="<%=basePath%>bootstrap3/css/bootstrap.min.css" type="text/css"
	media="screen, project, print" />
<link rel="stylesheet"
	href="<%=basePath%>bootstrap3/css/main-cn.css?ver=2" type="text/css"
	media="screen, project, print" />

<link rel="stylesheet" type="text/css"
	href="http://www.jeasyui.net/Public/js/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"
	href="http://www.jeasyui.net/Public/js/easyui/themes/icon.css">
<script type="text/javascript"
	src="http://www.jeasyui.net/Public/js/easyui/jquery.easyui.min.js"></script>
<link rel="stylesheet" type="text/css"
	href="http://www.jeasyui.net/Public/js/easyui/demo/demo.css">
<script type="text/javascript"
	src="http://code.jquery.com/jquery-1.4.4.min.js"></script>

<!-- Bootstrap core CSS -->
<link href="<%=basePath%>bootstrap3/css/bootstrap.min.css"
	rel="stylesheet">
<link href="data:text/css;charset=utf-8,"
	data-href="<%=basePath%>bootstrap3/css/bootstrap-theme.min.css"
	rel="stylesheet" id="bs-theme-stylesheet">
<link href="<%=basePath%>bootstrap3/css/docs.min.css" rel="stylesheet">

<script src="<%=basePath%>bootstrap3/js/jquery.min.js"></script>

<script src="<%=basePath%>bootstrap3/js/bootstrap.min.js"></script>

<script src="<%=basePath%>bootstrap3/js/docs.min.js"></script>

<script src="<%=basePath%>bootstrap3/js/ie10-viewport-bug-workaround.js"></script>

<style type="text/css">
#heads {
	height: 100px;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

#mytitle {
	height: 90px;
	width: 100%;
	background: #9D9D9D;
}
</style>

<script type="text/javascript"
	src="http://www.jeasyui.net/Public/js/easyui/jquery.easyui.min.js"></script>
<script>
	function addTab(title, url) {
		if ($('#tt').tabs('exists', title)) {
			$('#tt').tabs('select', title);
		} else {
			var content = '<iframe scrolling="auto" frameborder="0"  src="'
					+ url + '" style="width:100%;height:100%;"></iframe>';
			$('#tt').tabs('add', {
				title : title,
				content : content,
				closable : true
			});
		}
	}
</script>
</head>

<body>
	<input type="hidden" value="${sessionScope.manager }" />
	<div class="easyui-panel"
		style="width: 100%; height: 900px; padding: 5px;">
		<div id="mytitle">
			<div id="hw1_masthead_wrap">
				<div id="hw1_subinfo"
					class="lg-container clearfix hidden-sm hidden-xs">
					<ul id="hw1_masthead_subinfo" class="clearfix">
						<li><font size="3" color="blue">欢迎光临：<c:if
									test="${sessionScope.role==1 }">管理员-</c:if>${sessionScope.manager.maname }<c:if
									test="${sessionScope.role==2 }">操作员-</c:if>${sessionScope.opeartor.opname }${sessionScope.user.username }</font>
						</li>

						<li><a href="<%=basePath%>user/exit.action" title="安全退出">
								<font size="3">安全退出</font>
						</a></li>

					</ul>
				</div>
				<div id="hw1_global_nav" class="lg-container">
					<nav>
						<div id="hw1_logo">
							<a href=""> <img src="<%=basePath%>bootstrap3/imgs/logo.jpg">
							</a>
						</div>
						<ul class="nav_ul hw1_masthead_cata hidden-sm hidden-xs">
							<li style="width: 200px;"><a href="#"><i><span
										class="glyphicon glyphicon-user"></span></i><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;我想...
								</span></a></li>

							<li>
							<li style="width: 200px;"><a
								onclick="addTab('关于我们','<%=basePath%>aboutMe.jsp')">
									<div align="center">
										<font size="4">关于我们</font>
									</div>
							</a></li>

							<li style="width: 200px;"><a href='#'
								onclick="addTab('公司消息','<%=basePath%>manager/allInfo.action')">
									<div align="center">
										<font size="4">更多消息</font>
									</div>
							</a></li>

							<li style="width: 200px;"><a href='#'
								onclick="addTab('电费信息','<%=basePath%>manager/figure.action')">
									<div align="center">
										<font size="4">电费信息</font>
									</div>
							</a></li>

							<%
								String role = (String) session.getAttribute("role");
								if (role.equals("3")) {
							%><li style="width: 200px;"><a href="#"
								onclick="addTab('公司消息','<%=basePath%>netuser/AddSuggest.action')">
									<div align="center">
										<font size="4">你的建议</font>
									</div>
							</a></li>
							<%
								}
							%>

						</ul>
				</div>
			</div>
		</div>
		<div class="easyui-layout" data-options="fit:true">
			<div data-options="region:'west',split:true"
				style="width: 300px; padding: 10px; background: #CCCCCC;"
				align="center">
				<%
					if (role.equals("1")) {
				%><button type="button" class=" btn-default btn-lg btn-block"
					style="margin: 40px 0px;"
					onclick="addTab('输入需要发布的消息','<%=basePath%>manager/releaseInfo.action')">
					<font color="#000099">发布消息</font>
				</button>
				<%
					}
				%>
				<%
					if (role.equals("1")) {
				%><button type="button" class=" btn-default btn-lg btn-block"
					style="margin: 40px 0px;"
					onclick="addTab('添加操作员','<%=basePath%>manager/addOp.action')">
					<font color="#000099">添加操作员</font>
				</button>
				<%
					}
				%>
				<%
					if (role.equals("1")) {
				%><button type="button" class=" btn-default btn-lg btn-block"
					style="margin: 40px 0px;"
					onclick="addTab('最新动态','<%=basePath%>manager/allMind.action')">
					<font color="#000099">公司动态</font>
				</button>
				<%
					}
				%>
				<%
					if (role.equals("1")) {
				%><button type="button" class=" btn-default btn-lg btn-block"
					style="margin: 40px 0px;"
					onclick="addTab('添加文件','<%=basePath%>manager/upFile.action')">
					<font color="#000099">添加文件</font>
				</button>
				<%
					}
				%>
				<%
					if (role.equals("2")) {
				%><button type="button" class=" btn-default btn-lg btn-block"
					style="margin: 40px 0px;"
					onclick="addTab('信息录入','<%=basePath%>Op/adduser.action')">
					<font color="#000099">录入群众信息</font>
				</button>
				<%
					}
				%>
				<%
					if (role.equals("2")) {
				%><button type="button" class=" btn-default btn-lg btn-block"
					style="margin: 40px 0px;"
					onclick="addTab('缴费管理','<%=basePath%>Op/userPay.action')">
					<font color="#000099">缴费管理</font>
				</button>
				<%
					}
				%>
				<c:if test="${sessionScope.role==2}">
					<button type="button" class=" btn-default btn-lg btn-block"
						style="margin: 40px 0px;"
						onclick="addTab('查询账单','<%=basePath%>Op/queryBill.action')">
						<font color="#000099">查询账单</font>
					</button>
				</c:if>
				<c:if test="${sessionScope.role==3}">
					<button type="button" class=" btn-default btn-lg btn-block"
						style="margin: 40px 0px;"
						onclick="addTab('信息查询修改','<%=basePath%>netuser/modify.action')">
						<font color="#000099">个人信息</font>
					</button>
				</c:if>
				<c:if test="${sessionScope.role==3}">
					<button type="button" class=" btn-default btn-lg btn-block"
						style="margin: 40px 0px;"
						onclick="addTab('密码修改','<%=basePath%>netuser/modifyPsw.action')">
						<font color="#000099">密码修改</font>
					</button>
				</c:if>
				<%
					if (role.equals("3")) {
				%><button type="button" class=" btn-default btn-lg btn-block"
					style="margin: 40px 0px;"
					onclick="addTab('网上交费','<%=basePath%>netuser/userNowPay.action')">
					<font color="#000099">网上缴费</font>
				</button>
				<%
					}
				%>

				<%
					if (role.equals("3")) {
				%><button type="button" class=" btn-default btn-lg btn-block"
					style="margin: 40px 0px;"
					onclick="addTab('账单查询','<%=basePath%>netuser/rechange.action')">
					<font color="#000099">账单查询</font>
				</button>
				<%
					}
				%>
				<c:if test="${sessionScope.role==3}">
					<button type="button" class=" btn-default btn-lg btn-block"
						style="margin: 40px 0px;"
						onclick="addTab('电费查询','<%=basePath%>netuser/queryCh.action')">
						<font color="#000099">电费查询</font>
					</button>
				</c:if>
				<%
					if (role.equals("3")) {
				%><button type="button" class=" btn-default btn-lg btn-block"
					style="margin: 40px 0px;"
					onclick="addTab('替好友缴费','<%=basePath%>netuser/helpPerson.action')">
					<font color="#000099">帮助好友缴费</font>
				</button>
				<%
					}
				%>
				<c:if test="${sessionScope.role==3}">
					<button type="button" class=" btn-default btn-lg btn-block"
						style="margin: 40px 0px;"
						onclick="addTab('投诉','<%=basePath%>netuser/addComplain.action')">
						<font color="#000099">投诉</font>
					</button>
				</c:if>
			</div>
			<!--
                	描述：主要显示界面
                -->
			<div data-options="region:'center'" style="padding: 10px">
				<div id="tt" class="easyui-tabs" style="width: 100%; height: 800px;">
					<div title="我的主页">
						<div id="head" style="background: gray;">
							<div
								style="height: 100%; width: 50%; margin-left: auto; margin-right: auto;">
								<font size="7">郴电国际最新消息
									</h1>
								</font><br /> <font color="#FFFFFF" size="5">&nbsp;&nbsp;&nbsp;&nbsp;了解更多的消息请点击更多消息</font>
							</div>
						</div>
						<c:if test="${sessionScope.role==3}">
							<div style="height: 40px"></div>
							<div id="head">
								<div
									style="height: 100%; width: 50%; margin-left: auto; margin-right: auto;"
									class="list-group-item active">
									<font size="6">你当前账户余额为： </font><br>
									<div class="col-md-6"></div>
									<font color="#FFFFFF" size="5">&nbsp;&nbsp;&nbsp;&nbsp;${sessionScope.user.useradmin }RMB</font>
								</div>
							</div>
						</c:if>
						<div style="height: 40px"></div>
						<div class="list-group"
							style="width: 50%; margin-left: auto; margin-right: auto;">
							<a class="list-group-item active" style="background: #265A88;">
								<h2 class="list-group-item-heading">${sessionScope.newInfo.titlt }
									<span class="badge"
										style="color: #003399; background: #99CCFF;"><fmt:formatDate
											value="${sessionScope.newInfo.pubdate }"
											pattern="yyyy年MM月dd日HH时mm分" /></span>
								</h2>
								<p class="list-group-item-text" align="left">
								<h4>&nbsp;&nbsp;&nbsp;&nbsp;${sessionScope.newInfo.content }</h4>
								</p>
								<h4>
									<p class="list-group-item-text" align="right">${sessionScope.newInfo.pubman }</p>
								</h4>
							</a>
						</div>
					</div>
				</div>
			</div>
		</div>
</body>

</html>